<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>KPromise</title>
</head>
<body>
  
  <script src="./KPromise.catch.js"></script>
  <script>
    let k1 = new KPromise((resolve, reject) => {
      setTimeout(() => {
        // console.log('KPromise')
        reject('出错了')
      }, 1000)
    })

    k1.then(re => {

    }, err => {
      console.log(err)
    })

  </script>
</body>
</html>